package com.example.shop.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import lombok.experimental.Accessors;

/**
* <p>
* 商品型号
* </p>
*
* @author 作者
* @since 2022-05-29
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("r_goods_class")
public class GoodsClass extends Model<GoodsClass> {

    private static final long serialVersionUID = 1L;
    /**
     * 款式归属的商品id
     */
    private long goodsId;
    /**
     * 款式的图片
     */
    private String goodsClassPicture;
    @TableId(value = "goods_class", type = IdType.ASSIGN_ID)
    /**
     * 款式名
     */
    private String goodsClass;
    /**
     * 款式的价格，单位的分，即1代表1分
     */
    private Integer classPrice;
    /**
     * 款式的库存量
     */
    private Integer classInventory;

    @Override
    public String toString() {
        return "GoodsClass{" +
                "goodsId=" + goodsId +
                ", goodsClassPicture='" + goodsClassPicture + '\'' +
                ", goodsClass='" + goodsClass + '\'' +
                ", classPrice=" + classPrice +
                ", classInventory=" + classInventory +
                '}';
    }
}
